//
//  HomeABTableViewCell.m
//  喜马拉雅首页
//
//  Created by dllo on 15/12/22.
//  Copyright © 2015年 刘倩男. All rights reserved.
//

#import "HomeABTableViewCell.h"
#import "HomeATableViewCell.h"
@interface HomeABTableViewCell ()<UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, retain) UITableView *myTableView;
@property (nonatomic, retain) UIImageView *myImageView;
@property (nonatomic, retain) UILabel *myLabel;
@property (nonatomic, retain) UILabel *label;
@end
@implementation HomeABTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createTableView];
    }
    return self;
}

- (void)createTableView{
    self.myTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 150, 414, 150)];
    self.myTableView.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.myTableView];
    
    self.myTableView.delegate = self;
    self.myTableView.dataSource = self;
    
    self.myTableView.scrollEnabled = NO;
    
    
    [self.myTableView registerClass:[HomeATableViewCell class] forCellReuseIdentifier:@"cellT"];
    
    
    UIImageView *imageView1 = [[UIImageView alloc] initWithFrame:CGRectMake(10, 15, 15, 15)];
    imageView1.image = [UIImage imageNamed:@"liveRadioCellPoint@2x.png"];
    [self addSubview:imageView1];
    
    UILabel *labelTitle = [[UILabel alloc] initWithFrame:CGRectMake(35, -2, 100, 50)];
    labelTitle.text = @"精品单听";
    [self addSubview:labelTitle];
    
    UIImageView *imageView2 = [[UIImageView alloc] initWithFrame:CGRectMake(380, 80, 20, 20)];
    imageView2.image = [UIImage imageNamed:@"cell_arrow@2x.png"];
    [self addSubview:imageView2];
    
    UILabel *moreLabel = [[UILabel alloc] initWithFrame:CGRectMake(355, -2, 100, 50)];
    moreLabel.text = @"更多";
    moreLabel.textColor = [UIColor grayColor];
    moreLabel.font = [UIFont systemFontOfSize:14];
    [self addSubview:moreLabel];
    
    UIImageView *imageView3 = [[UIImageView alloc] initWithFrame:CGRectMake(385, 17, 13, 13)];
    imageView3.image = [UIImage imageNamed:@"cell_arrow@2x.png"];
    [self addSubview:imageView3];
    
    
    self.myImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 50, 95, 95)];
    self.myImageView.backgroundColor = [UIColor purpleColor];
    [self addSubview:self.myImageView];
    
    self.myLabel = [[UILabel alloc] initWithFrame:CGRectMake(120, 60, 200, 50)];
    self.myLabel.text = @"周五见! 6档节目满足你八卦的心";
    [self.myLabel sizeToFit];
    [self addSubview:self.myLabel];
    
    self.label = [[UILabel alloc] initWithFrame:CGRectMake(120, 90, 100, 50)];
    self.label.text = @"谁不曾开过夜谈会";
    self.label.textColor = [UIColor grayColor];
    self.label.font = [UIFont systemFontOfSize:13];
    [self.label sizeToFit];
    [self addSubview:self.label];
    
    UIImageView *imageViewFoot = [[UIImageView alloc] initWithFrame:CGRectMake(0, 260, 414, 20)];
    imageViewFoot.image = [UIImage imageNamed:@"cell_bg_bottom_h@2x.png"];
    [self addSubview:imageViewFoot];


    
    
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 120;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    HomeATableViewCell *cellT = [tableView dequeueReusableCellWithIdentifier:@"cellT"];
    
    
    return cellT;
}

@end
